package com.awen.htmlparser.rule;

/**
 * CyouHTML解析规则条目
 * 此条目已经具体到单个字段，一个item对应一个parser
 * User: awen
 * Date: 13-4-8
 * Time: 上午9:54
 * To change this template use File | Settings | File Templates.
 */
public class CyouHtmlParseRuleItem{

    private String itemName;//字段名称 显示名称

    private String key;//结果结返回key，一般对应数据库字段

    private String encoding = "UTF-8";//编码

    private String plainTextFormat;//字段处理 格式如 TRIM|SUBSTR:1,2

    private RuleConfig ruleConfig;

    private CyouHtmlParseRule cyouHtmlParseRule;

    public String getItemName() {
        return itemName;
    }

    public void setItemName(String itemName) {
        this.itemName = itemName;
    }

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public String getEncoding() {
        return encoding;
    }

    public void setEncoding(String encoding) {
        this.encoding = encoding;
    }

    public String getPlainTextFormat() {
        return plainTextFormat;
    }

    public void setPlainTextFormat(String plainTextFormat) {
        this.plainTextFormat = plainTextFormat;
    }

    public RuleConfig getRuleConfig() {
        return ruleConfig;
    }

    public void setRuleConfig(RuleConfig ruleConfig) {
        this.ruleConfig = ruleConfig;
    }

    public CyouHtmlParseRule getCyouHtmlParseRule() {
        return cyouHtmlParseRule;
    }

    public void setCyouHtmlParseRule(CyouHtmlParseRule cyouHtmlParseRule) {
        this.cyouHtmlParseRule = cyouHtmlParseRule;
    }

    @Override
    public String toString() {
        return "CyouHtmlParseRuleItem{" +
                "itemName='" + itemName + '\'' +
                ", key='" + key + '\'' +
                ", encoding='" + encoding + '\'' +
                ", plainTextFormat='" + plainTextFormat + '\'' +
                ", ruleConfig=" + ruleConfig +
                ", cyouHtmlParseRule=" + cyouHtmlParseRule +
                '}';
    }
}
